<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2023-02-16 18:37:27
 * @Last Modified time: 2023-02-17 17:03:06
 */
namespace app\common\dao\store;

use frank\base\BaseDao;
use app\common\model\store\GoodsCommentModel;

/**
 * Class GoodsCommentDao
 * @package app\common\dao\store
 */
class GoodsCommentDao extends BaseDao
{
    /**
     * 设置模型名
     */
    protected function setModel(): string
    {
        return GoodsCommentModel::class;
    }

    public function getGoodsCommentList(array $where = [], int $page, int $limit)
    {
        return $this->search($where)->with(['user','goods'])->order('id DESC')->page($page)->paginate($limit)->toArray();
    }
}
